Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 30, 2025

Addresses static analysis security warning S105 flagged in PR #40 review about hardcoded token type in Token schema.

Changes

  • Added DEFAULT_TOKEN_TYPE constant to app/config.py for centralizing OAuth2 token type configuration
  • Updated Token schema in app/schemas.py to reference the constant instead of inline string literal
  • Suppressed false-positive S105 warning with inline annotation (token type is not a password)
# Before
class Token(BaseModel):
    access_token: str
    token_type: str = "bearer"
    refresh_token: str | None = None

# After
from app.config import DEFAULT_TOKEN_TYPE

class Token(BaseModel):
    access_token: str
    token_type: str = DEFAULT_TOKEN_TYPE
    refresh_token: str | None = None

This eliminates the static analysis warning while maintaining backward compatibility and improving maintainability.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Address feedback from PR #40 on CI precommit refactor Replace hardcoded 'bearer' token type with configuration constant Oct 30, 2025
Copilot AI requested a review from Neiland85 October 30, 2025 15:08
@Neiland85
Copy link
Owner

Closing this PR. It is now outdated after the full system refactor completed in December 2025.

The project has been unified under a new architecture, updated dependencies, and a consistent configuration model.

Keeping this PR open would introduce inconsistencies and no longer provides technical value.

@Neiland85 Neiland85 closed this Dec 10, 2025
@Neiland85 Neiland85 deleted the copilot/sub-pr-40-8cc8d124-33e5-4fe2-b9a7-a39dd036476f branch December 10, 2025 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants